﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Net;
using System.Text;
using StockApi;
using StockApi.Enum;
using StockApi.StockProperties;

namespace ConsoleApplication2
{
    public class Program
    {
        public static void Main()
        {
            var util = new StockWebUtility();
            var parameter = new StockParameter
            {
                FromDate = new DateTime(2004,12,12),
                ToDate = DateTime.Now,
                Interval = Interval.d,
                StockTicker = "MSFT"
            };
            var result = new StockResult();
            var result2 = util.GetStockResultFor(parameter,result);
            using (var stream = new StreamWriter(@"C:\Users\maxim\Downloads\Results.csv"))
            {
                stream.Write(result2.MetaData);
            }
        }
    }
}